package cn.wusifx.zabbix.request.builder.graph;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/graph/update
 */
public class GraphUpdateRequestBuilder extends UpdateRequestBuilder {
    private String graphId;
    public GraphUpdateRequestBuilder(String auth) {
        super("graph.update", auth);
    }

    public GraphUpdateRequestBuilder(Long id, String auth) {
        super("graph.update", id, auth);
    }

    public String getGraphId() {
        return graphId;
    }

    public GraphUpdateRequestBuilder setGraphId(String graphId) {
        this.graphId = graphId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("graphid",graphId);
        return baseRequest;
    }
}
